package com.dalin.platform.loa.action;

import java.util.List;

import com.dalin.framework.action.StrutsTwoAction;
import com.dalin.platform.loa.service.WsSecurityService;
import com.dalin.platform.loa.vo.WsMenuTreeVo;

/*****************************************************************************
 * @content: 根据用户登录进行cutePlat系统菜单验证                                                                          *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2010-05-31                                                     *
 ****************************************************************************/
public class SecurityMenuTreeQueryAction extends StrutsTwoAction {
	private WsSecurityService wsSecurityService;
	private Long parentId;

	public String execute() throws Exception {
		super.printInfo("", "===== this action begin");
		try {
			List<WsMenuTreeVo> dataList = wsSecurityService
					.queryMenus(getCurrentUser().getLum(), getParentId());
			setResContent(dataList);
		} catch (Exception e) {
			e.printStackTrace();
		}
		super.printInfo("", "===== this action end");
		return null;
	}
	
	
	public Long getParentId() {
		return parentId == null ? -1L : parentId;
	}
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public WsSecurityService getWsSecurityService() {
		return wsSecurityService;
	}
	public void setWsSecurityService(WsSecurityService wsSecurityService) {
		this.wsSecurityService = wsSecurityService;
	}
}
